<template>
  <!-- 全部资产 -->
  <div class="box" style="background-color: #eee; height: 667px">
    <!-- 左按钮，跳转到我的页面 -->
    <van-nav-bar title="我的资产" left-arrow  @click-left="fun1">
      <template #right>
        <van-icon name="ellipsis" size="26" @click="fun" />
        <div class="box1" v-if="flag">
          <div class="dv1">
            <p><van-icon name="home-o" size="17" /></p>
            <div>首页</div>
          </div>
          <div class="dv1">
            <p><van-icon name="apps-o" size="17" /></p>
            <div>分类搜索</div>
          </div>
          <div class="dv1">
            <p><van-icon name="cart-o" size="17" /></p>
            <div>购物车</div>
          </div>
          <div class="dv1">
            <p><van-icon name="contact" size="17" /></p>
            <div>我的京东</div>
          </div>
          <div class="dv1">
            <p><van-icon name="browsing-history-o" size="17" /></p>
            <div>浏览记录</div>
          </div>
          <div class="dv1">
            <p><van-icon name="share-o" size="17" /></p>
            <div>分享</div>
          </div>
        </div>
      </template>
    </van-nav-bar>
    <div class="dv">
      <img
        src="https://img12.360buyimg.com/img/s160x160_jfs/t1/135104/23/6879/3504/5f34e852Ec0b703c2/d0d14b33d18e208d.png"
        alt=""
        width="40px"
      />
      <div class="right">
        <p>红包</p>
        <p class="txt">￥0.00</p>
      </div>
    </div>
    <div class="head" style="background-color: #fff">
      <ul>
        <li>
          <van-icon
            name="coupon"
            style="font-size: 30px; margin-top: 10px"
            color="red"
          />

          <p style="font-size: 14px; color: #333">优惠券</p>
          <p style="font-size: 12px; color: #999">1张</p>
        </li>
        <li>
          <van-icon
            name="gem"
            style="font-size: 30px; margin-top: 10px"
            color="#f57416"
          />

          <p style="font-size: 14px; color: #333">京豆</p>
          <p style="font-size: 12px; color: #999">10个</p>
        </li>
        <li>
          <van-icon
            name="gift-card"
            style="font-size: 30px; margin-top: 10px"
            color="#3a77e8"
          />
          <p style="font-size: 14px; color: #333">礼品卡</p>
          <p style="font-size: 12px; color: #999">0张</p>
        </li>
        <li>
          <van-icon
            name="balance-list"
            style="font-size: 30px; margin-top: 10px"
            color="red"
          />
          <p style="font-size: 14px; color: #333">余额</p>
          <p style="font-size: 12px; color: #999">￥0.00</p>
        </li>
        <li>
          <van-icon
            name="card"
            style="font-size: 30px; margin-top: 10px"
            color="#dab879"
          />
          <p style="font-size: 14px; color: #333">银行卡</p>
          <p style="font-size: 12px; color: #999">查看详情</p>
        </li>
        <li>
          <van-icon
            name="bill"
            style="font-size: 30px; margin-top: 10px"
            color="#dab879"
          />

          <p style="font-size: 14px; color: #333">白条</p>
          <p style="font-size: 12px; color: #999">￥1000.00</p>
        </li>
        <li>
          <van-icon
            name="underway"
            style="font-size: 30px; margin-top: 10px"
            color="#dab879"
          />

          <p style="font-size: 14px; color: #333">小白守约分</p>
          <p style="font-size: 12px; color: #999">659分</p>
        </li>
        <li>
          <van-icon
            name="new-arrival"
            style="font-size: 30px; margin-top: 10px"
            color="red"
          />

          <p style="font-size: 14px; color: #333">领货码</p>
          <p style="font-size: 12px; color: #999">1张</p>
        </li>
        <li>
          <van-icon
            name="balance-list"
            style="font-size: 30px; margin-top: 10px"
            color="#dab879"
          />
          <p style="font-size: 14px; color: #333">膨胀金</p>
          <p style="font-size: 12px; color: #999">查看详情</p>
        </li>
      </ul>
    </div>
    <div class="footer">
      <img
        src=""
        alt=""
        height="20px"
      />
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    fun() {
      this.flag = !this.flag;
    },
    // 跳转到我的 页面
    fun1() {
      this.$router.back();
    },
  },
  data() {
    return {
      active: 0,
      flag: false,
    };
  },
};
</script>

<style scoped>
.dv {
  width: 100%;
  height: 100px;
  background-color: #f2270c;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-align: center;
}
p {
  margin: 5px 10px;
}
.dv .txt {
  font-size: 12px;
}
.head ul {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
}
.head ul li {
  box-sizing: border-box;
  display: block;
  width: 125px;
  height: 90px;
  border: 1px solid #eee;
  text-align: center;
  line-height: 15px;
}
.footer {
  margin: 25px 0 75px;
  text-align: center;
}
.box1 {
  width: 125px;
  height: 240px;
  /* background-color: #eee; */
  background-color: black;
  opacity: 0.9;
  border-radius: 5px;
  position: absolute;
  top: 44px;
  right: 10px;
  z-index: 999;
}
.box1 .dv1 {
  display: flex;
  width: 125px;
  height: 40px;
  color: #fff;
  font-size: 14px;
}
.dv1 div {
  border-bottom: 1px solid #eee;
  width: 85px;
  line-height: 40px;
}

.dv1 p {
  width: 40px;
  text-align: center;
}
</style>